package com.obixlabs.kalua.domainmodel.list;

import java.util.Map;

import com.google.common.collect.Maps;
import com.obixlabs.kalua.domainmodel.NumericId;
import com.obixlabs.kalua.domainmodel.user.User;
import com.obixlabs.kalua.domainmodel.user.UserAccountReference;

public class ShoppingListImpl implements ShoppingList {
	
	private ShoppingListId id;
	private UserAccountReference owner;
	private Map<User, ListPermission> sharers;
	private Map<NumericId, Integer> items;
	
	public ShoppingListImpl() { 
		this.items = Maps.newHashMap();
		this.sharers = Maps.newHashMap();
	}
		

	public ShoppingListImpl(	final ShoppingListId id, final UserAccountReference owner,
											final Map<User, ListPermission> sharers, 
											final Map<NumericId, Integer> items) {
		this();
		setId(id);
		setOwner(owner);
		this.sharers.putAll(sharers);
		this.items.putAll(items);
	}



	private void setOwner(final UserAccountReference owner) { this.owner = owner; }


	private void setId(ShoppingListId id2) {
		// TODO Auto-generated method stub		
	}


	@Override
	public ShoppingListId getId() { return this.id; }

	@Override
	public UserAccountReference getOwner() { return this.owner; }

	@Override
	public Map<User, ListPermission> getSharers() { return this.sharers; }

//	@Override
//	public Map<NumericId, Integer> getItems() { return this.items; }

}
